<?php
	global $SSO, $Security, $AppID, $User, $DB;

	//Check to see if there is a valid session 
	$SessionInfo = $SSO->isValidSession("index.php?action=login", $SSO->getSessionInformation());	
		
	//Check to see if the user has rights to be on LivingWeb
	$PageRights = array('ADMIN','USER');
	$UserRoles = $Security->ValidateUser($SessionInfo['username'], $AppID, $PageRights, 1);
	
	if(isset($_POST['txtDisplay']) && isset($_POST['txtLink']) && isset($_GET['div_code']))
	{
		$menuObj = new menu;
		$menuObj->insertMenuItem($_POST['txtDisplay'],$_POST['txtLink'],'D',$_GET['div_code']);
	}
	
	header("Location: index.php?action=menu_by_div&div_code=" . $_GET['div_code']);
?>
 
 
